<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="main">
        <canvas id="canvas">不支持canvas!</canvas>
    </div>

    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        body {
            overflow: hidden;
        }

        .main {
            color: red;
            text-align: center;
        }
    </style>
    <script>
        /** @type {HTMLCanvasElement} */
        let canvas = document.getElementById("canvas")
        canvas.width = window.innerWidth
        canvas.height = window.innerHeight
        let context = canvas.getContext("2d")
        context.fillStyle = "#000";
        context.fillRect(0, 0, canvas.width, canvas.height);
        context.fill();
        context.globalAlpha(.7)


        function update() {
            context.fillStyle = "#000";
            context.fillRect(0, 0, canvas.width, canvas.height);
            context.fill();

            context.fillStyle = "#010";
            context.fillText("6666666666666666666666")

            requestAnimationFrame(update);
        }
    </script>
</body>

</html>